package com.zxy.ziems.server.energy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zxy.btp.common.response.PageResult;
import com.zxy.ziems.server.classify.pojo.param.ClassifyMeasureDataHourParam;
import com.zxy.ziems.server.device.pojo.dto.DeviceMeasureDataHourDTO;
import com.zxy.ziems.server.device.pojo.vo.DeviceMeasureDataHourVO;
import com.zxy.ziems.server.domain.DeviceMeasureDataIncrementHour;
import com.zxy.ziems.server.energy.pojo.dto.DeviceMeasureDayCostDTO;
import com.zxy.ziems.server.energy.pojo.param.DeviceMeasureDataDayPageParam;
import com.zxy.ziems.server.energy.pojo.param.DeviceMeasureDataIncrementHourPageParam;
import com.zxy.ziems.server.energy.pojo.vo.DeviceMeasureDataDayVO;
import com.zxy.ziems.server.energy.pojo.vo.DeviceMeasureDataIncrementHourVO;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Copyright (C),
 * @ClassName: DeviceMeasureDataIncrementHourService
 * @Author: yanzhiwei
 * @Description:
 * @Date: 2024/4/7 14:53
 */
public interface DeviceMeasureDataIncrementHourService extends IService<DeviceMeasureDataIncrementHour> {
    PageResult<DeviceMeasureDataHourVO> getDeviceMeasureDataHour(ClassifyMeasureDataHourParam param);

    /**
     * 获取天费用，基于小时花费，统计天花费
     * @param date
     * @return
     */
    List<DeviceMeasureDayCostDTO> getDayPrice(LocalDate date);

    /**
     * 获取天费用，基于小时花费，统计天花费
     * @param dataTypeId
     * @param deviceId
     * @param date
     * @return
     */
    BigDecimal getDayPrice(LocalDate date, String dataTypeId, String deviceId);

    /**
     * 修改小时数据
     * @param dto
     */
    void modifyMeasureDataHour(DeviceMeasureDataHourDTO dto);

    /**
     * 获取数据修正分页天数据
     * @param param
     * @return
     */
    PageResult<DeviceMeasureDataHourVO> getMeasureData(ClassifyMeasureDataHourParam param);

    /**
     * 数据修正
     * @param dtos
     */
    void modifyMeasureData(List<DeviceMeasureDataHourDTO> dtos);

    /**
     * 按照时间批量修正小时数据值
     */
    void modifyHourData(String dateTimeStr);

    PageResult<DeviceMeasureDataIncrementHourVO> getPageList(DeviceMeasureDataIncrementHourPageParam param);

    boolean  updateMeasureIncrementHourData(com.zxy.ziems.server.energy.pojo.param.DeviceMeasureDataIncrementHour data);
}
